package com.gec.it.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gec.it.dao.PowerDao;
import com.gec.it.service.WorkFlowBrige;

@Service("workflowbrige")
public class WorkFlowBrigeImpl implements WorkFlowBrige{
	@Autowired
	private PowerDao powerDao;
//	@Autowired
//	private DoctorsDao dao;
	//${method.getPower("报销部门审批",userkey)}
	@Override
	public List<String> getPower(String type,String userkey){

		int empId=Integer.parseInt(userkey.split("_")[0]);
		List<String> list= powerDao.selectPowerByType(type,empId);
		System.out.println("查找"+userkey+"的部门审批人");
		for (String s : list) {
			System.out.println(s);
		}
		return list;

	}
	@Override
	public List<String> getPower2(String type){

		List<String> list= powerDao.selectPowerByType2(type);
		System.out.println("查找公司的部门审批人");
		for (String s : list) {
			System.out.println(s);
		}
		return list;
	}
}
